<!--{eval $_G['home_tpl_titles'] = array(getstr($pic['title'], 60, 0, 0, 0, -1), $album['albumname'], '{lang album}');}-->
<!--{eval $friendsname = array(1 => '{lang friendname_1}',2 => '{lang friendname_2}',3 => '{lang friendname_3}',4 => '{lang friendname_4}');}-->

<!--{if empty($diymode)}-->
<!--{template common/header}-->

<div id="pt" class="bm cl">
	<!--{subtemplate common/simplesearchform}-->
	<div class="z">
		<a href="./" class="nvhm" title="{lang homepage}">$_G[setting][bbname]</a> <em>&rsaquo;</em>
		<a href="home.php">$_G[setting][navs][4][navname]</a> <em>&rsaquo;</em> 
		<a href="home.php?mod=space&do=album">{lang album}</a> <em>&rsaquo;</em> 
		<a href="home.php?mod=space&uid=$space[uid]&do=album&view=me">{$space[username]}{lang somebody_album}</a>
	</div>
</div>

<style id="diy_style" type="text/css"></style>
<div class="wp">
	<!--[diy=diy1]--><div id="diy1" class="area"></div><!--[/diy]-->
</div>

<!--{else}-->
<!--{template home/space_header}-->
<!--{/if}-->

<!--{if empty($diymode)}-->
<div id="ct" class="ct2_a wp cl">
	<div class="mn">
		<!--[diy=diycontenttop]--><div id="diycontenttop" class="area"></div><!--[/diy]-->
		<div class="bm bw0">
		<!--{if $space[self]}-->
			<h1 class="mt"><img alt="album" src="{STATICURL}image/feed/album.gif" class="vm" /> {lang album} - $album[albumname]</h1>
			<ul class="tb cl">
				<li$actives[we]><a href="home.php?mod=space&uid=$space[uid]&do=album&view=we">{lang friend_album}</a></li>
				<li$actives[me]><a href="home.php?mod=space&uid=$space[uid]&do=album&view=me">{lang my_album}</a></li>
				<li$actives[all]><a href="home.php?mod=space&uid=$space[uid]&do=album&view=all">{lang view_all}</a></li>
				<li class="o"><a href="home.php?mod=spacecp&ac=upload&albumid=$pic[albumid]">{lang upload_pic}</a></li>
				<!--{if $_G[referer]}-->
				<li class="y"><a href="$_G[referer]">&laquo; {lang previous_page}</a></li>
				<!--{/if}-->
			</ul>
		<!--{else}-->
			{eval
				$_G['home_tpl_spacemenus'][] = "<a href=\"home.php?mod=space&uid=$space[uid]&do=album&view=me\">{lang they_album}</a>";
				$_G['home_tpl_spacemenus'][] = "<a href=\"home.php?mod=space&uid=$space[uid]&do=album&id=$pic[albumid]\">$album[albumname]</a>";
				$_G['home_tpl_spacemenus'][] = "<a href=\"home.php?mod=space&uid=$space[uid]&do=album&picid=$pic[picid]\">{lang look_pic}</a>";
			}
			<!--{template home/space_menu}-->
			<hr class="l m0" />
		<!--{/if}-->

<!--{else}-->
<div id="ct" class="ct2 wp cl">
	<div class="mn">
		<div class="bm">
			<div class="bm_h">
				<h1>{lang album}<span class="xs1 xw0">( <a href="home.php?mod=spacecp&ac=upload">{lang upload_pic}</a> )</span></h1>
			</div>
			<div class="bm_c">
<!--{/if}-->
				<div class="tbmu" id="pic_block">
					<div class="y">
						<a href="javascript:;" onclick="imageRotate('pic', 1)"><img class="vm" src="{STATICURL}image/common/rleft.gif" /></a>
						<a href="javascript:;" onclick="imageRotate('pic', 2)"><img class="vm" src="{STATICURL}image/common/rright.gif" /></a><span class="pipe">|</span>
						<a href="home.php?mod=space&uid=$pic[uid]&do=$do&picid=$upid&goto=up#pic_block">{lang previous_pic}</a><span class="pipe">|</span>
						<a href="home.php?mod=space&uid=$pic[uid]&do=$do&picid=$nextid&goto=down#pic_block" id="nextlink">{lang next_pic}</a><span class="pipe">|</span>
						<!--{if $_GET['play']}-->
						<a href="javascript:;" id="playid" class="osld" onclick="playNextPic(false);">{lang stop_playing}</a>
						<!--{else}-->
						<a href="javascript:;" id="playid" class="osld" onclick="playNextPic(true);">{lang start_playing}</a>
						<!--{/if}--><span id="displayNum"></span>
					</div>
					<a href="home.php?mod=space&uid=$space[uid]&do=album&id=$pic[albumid]">&laquo; {lang return_pic_list}</a>
					<!--{if $album[picnum]}--><span class="pipe">|</span>{lang current_pic}<!--{/if}-->&nbsp;
					<!--{if $album['friend']}-->
					<span class="xg1"> &nbsp; {$friendsname[$value[friend]]}</span>
					<!--{/if}-->
					<!--{hook/space_albumpic_top}-->
				</div>

				<div class="vw pic">

					<div id="photo_pic" class="c{if $pic[magicframe]} magicframe magicframe$pic[magicframe]{/if}">
						<!--{if $pic[magicframe]}-->
						<div class="pic_lb1">
							<table cellpadding="0" cellspacing="0" class="">
								<tr>
									<td class="frame_jiao frame_top_left"></td>
									<td class="frame_x frame_top_middle"></td>
									<td class="frame_jiao frame_top_right"></td>
								</tr>
								<tr>
									<td class="frame_y frame_middle_left"></td>
									<td class="frame_middle_middle">
										<!--{/if}--><a href="home.php?mod=space&uid=$pic[uid]&do=$do&picid=$nextid&goto=down#pic_block"><img src="$pic[pic]" id="pic" alt="" /></a>
										<script type="text/javascript">
											function createElem(e){
												var obj = document.createElement(e);
												obj.style.position = 'absolute';
												obj.style.zIndex = '1';
												obj.style.cursor = 'pointer';
												obj.onmouseout = function(){ this.style.background = 'none';}
												return obj;
											}
											function viewPhoto(){
												var pre = createElem('div');
												var next = createElem('div');
												var cont = $('photo_pic');
												var tar = $('pic');
												var space = 0;
												var w = cont.offsetWidth/2;
												if(!!window.ActiveXObject && !window.XMLHttpRequest){
													space = -(cont.offsetWidth - tar.width)/2;
												}

												pre.style.left = space + 'px';
												next.style.left = space + w + 'px';
												pre.style.top = next.style.top = 0;

												pre.style.width = next.style.width = w + 'px';
												pre.style.height = next.style.height = tar.height + 'px';
												pre.innerHTML = next.innerHTML = '<img src="{IMGDIR}/emp.gif" width="' + w + '" height="' + tar.height + '" />';

												pre.onmouseover = function(){ this.style.background = 'url({IMGDIR}/pic-prev.gif) no-repeat 10px 50%'; }
												pre.onclick = function(){ window.location = 'home.php?mod=space&uid=$pic[uid]&do=$do&picid=$upid&goto=up#pic_block'; }

												next.onmouseover = function(){ this.style.background = 'url({IMGDIR}/pic-next.gif) no-repeat 94% 50%'; }
												next.onclick = function(){ window.location = 'home.php?mod=space&uid=$pic[uid]&do=$do&picid=$nextid&goto=down#pic_block'; }

												cont.style.position = 'relative';
												cont.appendChild(pre);
												cont.appendChild(next);
											}
											window.onload = function(){
												viewPhoto();
											}
										</script>
										<!--{if $pic[magicframe]}-->
									</td>
									<td class="frame_y frame_middle_right"></td>
								</tr>
								<tr>
									<td class="frame_jiao frame_bottom_left"></td>
									<td class="frame_x frame_bottom_middle"></td>
									<td class="frame_jiao frame_bottom_right"></td>
								</tr>
							</table>
						</div>
						<!--{/if}-->
					</div>

					<div class="pns mlnv vm mtm cl">
							<a href="home.php?mod=space&uid=$pic[uid]&do=$do&picid=$upid&goto=up#pic_block" class="btn" title="{lang previous_pic}"><img src="{STATICURL}image/common/pic_nv_prev.gif" alt="{lang previous_pic}"/></a><!--{loop $piclist $value}--><a href="home.php?mod=space&uid=$value[uid]&do=album&picid=$value[picid]#pic_block"><img alt="" src="$value[pic]"{if $value[picid]==$picid} class="a"{/if} /></a><!--{/loop}--><a href="home.php?mod=space&uid=$pic[uid]&do=$do&picid=$nextid&goto=down#pic_block" class="btn" title="{lang next_pic}"><img src="{STATICURL}image/common/pic_nv_next.gif" alt="{lang next_pic}"/></a>
					</div>

					<div class="d">
						<!--{if $pic[title]||$pic[status]}--><p id="a_set_title">$pic[title]<!--{if $pic[status] == 1}--><b>({lang moderate_need})</b><!--{/if}--></p><!--{/if}-->
						<p class="xg1">
							<!--{if $pic[hot]}--><span class="hot">{lang hot} <em>$pic[hot]</em></span><!--{/if}-->
							<!--{if $do=='event'}--><a href="home.php?mod=space&uid=$pic[uid]" target="_blank">$pic[username]</a><!--{/if}-->
							{lang upload_at} <!--{date($pic[dateline])}--> ($pic[size])
						</p>
						<!--{if isset($_GET['exif'])}-->
							<!--{if $exifs}-->
								<!--{loop $exifs $key $value}-->
									<!--{if $value}--><p>$key : $value</p><!--{/if}-->
								<!--{/loop}-->
							<!--{else}-->
								<p>{lang no_exif}</p>
							<!--{/if}-->
						<!--{/if}-->
						<p class="xs1">
							<a href="$pic[pic]" target="_blank">{lang look_pic}</a>
							<!--{if !isset($_GET['exif'])}-->
							<span class="pipe">|</span><a href="$theurl&exif=1">{lang look_exif}</a>
							<!--{/if}-->
							<!--{if $_G['group']['allowdiy'] || $_G['group']['allowauthorizedblock']}-->
							<span class="pipe">|</span><a href="portal.php?mod=portalcp&ac=portalblock&op=recommend&idtype=picid&id=$pic[picid]" onclick="showWindow('recommend', this.href, 'get', 0)">{lang blockdata_recommend}</a>
							<!--{/if}-->
							<!--{if $pic[uid] != $_G['uid']}-->
							<span class="pipe">|</span><a href="javascript:;" onclick="showWindow('miscreport$pic[picid]', 'misc.php?mod=report&rtype=pic&uid=$pic[uid]&rid=$pic[picid]', 'get', -1);return false;">{lang report}</a>
							<!--{/if}-->
							<!--{hook/space_albumpic_bottom}-->
						</p>
					</div>

					<div class="o cl">
						<a href="home.php?mod=spacecp&ac=share&type=pic&id=$pic[picid]&handlekey=sharealbumhk_{$pic[picid]}" id="a_share_$pic[picid]" onclick="showWindow(this.id, this.href, 'get', 0);" class="oshr">{lang share}</a>

						<!--{hook/space_albumpic_op_extra}-->
						<!--{if $pic[uid] == $_G[uid]}-->
						<!--{if $_G[magic][frame]}-->
							<img src="{STATICURL}image/magic/frame.small.gif" alt="frame" class="vm" />
							<!--{if $pic[magicframe]}-->
							<a id="a_magic_frame" href="home.php?mod=spacecp&ac=magic&op=cancelframe&idtype=picid&id=$pic[picid]" onclick="ajaxmenu(event,this.id)">{lang cancel_frame}</a>
							<!--{else}-->
							<a id="a_magic_frame" href="home.php?mod=magic&mid=frame&idtype=picid&id=$pic[picid]" onclick="ajaxmenu(event,this.id, 1)">{lang add_frame}</a>
							<!--{/if}-->
							<span class="pipe">|</span>
						<!--{/if}-->

						<!--{/if}-->

						<!--{if $_G[uid] == $pic[uid] || checkperm('managealbum')}-->
						<a href="home.php?mod=spacecp&ac=album&op=editpic&albumid=$pic[albumid]&picid=$pic[picid]">{lang manage_pic}</a><span class="pipe">|</span>
						<a href="home.php?mod=spacecp&ac=album&op=edittitle&albumid=$pic[albumid]&picid=$pic[picid]&handlekey=edittitlehk_{$pic[picid]}" id="a_set_title" onclick="showWindow(this.id, this.href, 'get', 0);">{lang edit_description}</a>
						<!--{/if}-->

						<!--{if checkperm('managealbum')}-->
						<span class="pipe">|</span>IP: $pic[postip]
						<span class="pipe">|</span><a href="home.php?mod=spacecp&ac=album&picid=$pic[picid]&op=edithot&handlekey=picedithothk_{$pic[picid]}" id="a_hot_$pic[picid]" onclick="showWindow(this.id, this.href, 'get', 0);">{lang hot}</a>
						<!--{/if}-->
						<!--a href="home.php?mod=spacecp&ac=common&op=report&idtype=picid&id=$pic[picid]&handlekey=reportpichk_{$pic[picid]}" id="a_report" onclick="showWindow(this.id, this.href, 'get', 0);">{lang report}</a-->
					</div>

				</div>
				<!--[diy=diyclicktop]--><div id="diyclicktop" class="area"></div><!--[/diy]-->
				<div id="click_div">
					<!--{template home/space_click}-->
				</div>
				<!--[diy=diycommenttop]--><div id="diycommenttop" class="area"></div><!--[/diy]-->
				<div id="pic_comment" class="bm bw0 mtm mbm">
					<h3 class="pbn bbs">
						<!--{if !empty($list)}-->
						<a href="home.php?mod=space&uid=$pic[uid]&do=$do&picid=$pic[picid]#quickcommentform_{$picid}" class="y xi2 xw0">{lang publish_comment}</a>
						<!--{/if}-->
						{lang comment}
					</h3>
					<div id="comment">
						<!--{if $cid}-->
						<div class="i">
							{lang current_comment}
						</div>
						<!--{/if}-->

						<div id="comment_ul" class="xld xlda">
						<!--{loop $list $value}-->
							<!--{template home/space_comment_li}-->
						<!--{/loop}-->
						</div>
					</div>
					<!--{if $multi}--><div class="pgs cl mtm">$multi</div><!--{/if}-->
				</div>
				<form id="quickcommentform_{$picid}" name="quickcommentform_{$picid}" action="home.php?mod=spacecp&ac=comment&handlekey=qcpic_{$picid}" method="post" autocomplete="off" onsubmit="ajaxpost('quickcommentform_{$picid}', 'return_qcpic_{$picid}');doane(event);" class="bm bw0" style="width: 600px;">
					<!--{if $_G['uid']}-->
						<p>
							<span id="comment_face" onclick="showFace(this.id, 'comment_message');return false;" style="cursor: pointer;"><img src="{IMGDIR}/facelist.gif" alt="facelist" class="vm" /></span>
							<!--{hook/space_albumpic_face_extra}-->
							<!--{if $_G['setting']['magicstatus'] && !empty($_G['setting']['magics']['doodle'])}-->
							<a id="a_magic_doodle" href="home.php?mod=magic&mid=doodle&showid=comment_doodle&target=comment_message" onclick="showWindow(this.id, this.href, 'get', 0)"><img src="{STATICURL}image/magic/doodle.small.gif" alt="doodle" class="vm" /> $_G['setting']['magics']['doodle']</a>
							<!--{/if}-->
						</p>
					<!--{/if}-->
					<div class="tedt mtn mbn">
						<div class="area">
							<!--{if $_G['uid']}-->
								<textarea id="comment_message" onkeydown="ctrlEnter(event, 'commentsubmit_btn');" name="message" rows="3" class="pt"></textarea>
							<!--{else}-->
								<div class="pt hm">{lang login_to_comment} <a href="member.php?mod=logging&action=login" onclick="showWindow('login', this.href)" class="xi2">{lang login}</a> | <a href="member.php?mod={$_G[setting][regname]}" onclick="showWindow('register', this.href)" class="xi2">$_G['setting']['reglinkname']</a></div>
							<!--{/if}-->
						</div>

					</div>
					<!--{if checkperm('seccode') && ($secqaacheck || $seccodecheck)}-->
						<!--{block sectpl}--><sec> <span id="sec<hash>" onclick="showMenu(this.id);"><sec></span><div id="sec<hash>_menu" class="p_pop p_opt" style="display:none"><sec></div><!--{/block}-->
						<div class="mtm mbm sec"><!--{subtemplate common/seccheck}--></div>
					<!--{/if}-->
					<p class="pns">
						<input type="hidden" name="refer" value="$theurl" />
						<input type="hidden" name="id" value="$picid" />
						<input type="hidden" name="idtype" value="picid" />
						<input type="hidden" name="commentsubmit" value="true" />
						<input type="hidden" name="quickcomment" value="true" />
						<button type="submit" name="commentsubmit_btn" value="true" id="commentsubmit_btn" class="pn"{if !$_G[uid]} onclick="showWindow(this.id, this.form.action);return false;"{/if}><strong>{lang comment}</strong></button>
						<span id="__quickcommentform_{$picid}"></span>
						<span id="return_qcpic_{$picid}"></span>
						<input type="hidden" name="formhash" value="{FORMHASH}" />
					</p>
				</form>
		</div>


		<script type="text/javascript">
			function succeedhandle_qcpic_{$picid}(url, msg, values) {
				if(values['cid']) {
					comment_add(values['cid']);
				} else {
					$('return_qcpic_{$picid}').innerHTML = msg;
				}
				<!--{if checkperm('seccode') && $sechash}-->
					<!--{if $secqaacheck}-->
					updatesecqaa('$sechash');
					<!--{/if}-->
					<!--{if $seccodecheck}-->
					updateseccode('$sechash');
					<!--{/if}-->
				<!--{/if}-->
			}
		</script>

		<script type="text/javascript">
			var interval = 5000;
			var timerId = -1;
			var derId = -1;
			var replay = false;
			var num = 0;
			var endPlay = false;
			function forward() {
				window.location.href = 'home.php?mod=space&uid=$pic[uid]&do=$do&picid=$nextid&goto=down&play=1#pic_block';
			}
			function derivativeNum() {
				num++;
				$('displayNum').innerHTML = '[' + (interval/1000 - num) + ']';
			}
			function playNextPic(stat) {
				if(stat || replay) {
					derId = window.setInterval('derivativeNum();', 1000);
					$('displayNum').innerHTML = '[' + (interval/1000 - num) + ']';
					$('playid').onclick = function (){replay = false;playNextPic(false);};
					$('playid').innerHTML = '{lang stop_playing}';
					timerId = window.setInterval('forward();', interval);
				} else {
					replay = true;
					num = 0;
					if(endPlay) {
						$('playid').innerHTML = '{lang restart}';
					} else {
						$('playid').innerHTML = '{lang start_playing}';
					}
					$('playid').onclick = function (){playNextPic(true);};
					$('displayNum').innerHTML = '';
					window.clearInterval(timerId);
					window.clearInterval(derId);
				}
			}
			<!--{if $_GET['play']}-->
			<!--{if $sequence && $album['picnum']}-->
			if($sequence == $album[picnum]) {
				endPlay = true;
				playNextPic(false);
			} else {
				playNextPic(true);
			}
			<!--{else}-->
			playNextPic(true);
			<!--{/if}-->
			<!--{/if}-->

			function update_title() {
				$('title_form').style.display='';
			}

			var elems = selector('dd[class~=magicflicker]'); 
			for(var i=0; i<elems.length; i++){
				magicColor(elems[i]);
			}
		</script>

		<!--end bm-->

	<!--[diy=diycontentbottom]--><div id="diycontentbottom" class="area"></div><!--[/diy]-->
	</div>



<!--{if empty($diymode)}-->
		<div class="appl">
		<!--{if empty($diymode)}-->
			<!--{subtemplate common/userabout}-->
		<!--{/if}-->
		</div>

	</div>

	<div class="wp mtn">
		<!--[diy=diy3]--><div id="diy3" class="area"></div><!--[/diy]-->
	</div>
<!--{else}-->
</div>
	<div class="sd">
		<!--{subtemplate home/space_userabout}-->
	</div>
<!--{/if}-->

<!--{template common/footer}-->